using System;
using Sinacor.Servico.Bovespa.Cliente.Service.DataContract.Request;
using Sinacor.Servico.Bovespa.Cliente.BusinessEntity;

namespace Sinacor.Servico.Bovespa.Cliente.Service.ServiceImplementation.Translator
{
    public static class TranslateBetweenConsultarClienteRequestAndCliente
    {
        public static Sinacor.Servico.Bovespa.Cliente.Service.DataContract.Request.ConsultarClienteRequest TranslateClienteToFiltroClienteRequest(Sinacor.Servico.Bovespa.Cliente.BusinessEntity.Cliente from)
        {
            Sinacor.Servico.Bovespa.Cliente.Service.DataContract.Request.ConsultarClienteRequest to = new Sinacor.Servico.Bovespa.Cliente.Service.DataContract.Request.ConsultarClienteRequest();
            to.Codigo = from.Codigo;
            to.Apelido = from.Apelido;
            to.Nome = from.Nome;
            to.CPFCNPJ = from.CPFCNPJ;
            to.CodigoOperacionalCVM = from.CodigoOperacionalCVM;
            return to;
        }

        public static Sinacor.Servico.Bovespa.Cliente.BusinessEntity.Cliente TranslateConsultarClienteRequestToCliente(Sinacor.Servico.Bovespa.Cliente.Service.DataContract.Request.ConsultarClienteRequest from)
        {
            Sinacor.Servico.Bovespa.Cliente.BusinessEntity.Cliente to = new Sinacor.Servico.Bovespa.Cliente.BusinessEntity.Cliente();
            to.Codigo = from.Codigo;
            to.Apelido = from.Apelido;
            to.Nome = from.Nome;
            to.CPFCNPJ = from.CPFCNPJ;
            to.CodigoOperacionalCVM = from.CodigoOperacionalCVM;
            to.Origem = from.Origem;  
            return to;
        }
    }
}

